package 文件内容操作;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Created with IntelliJ IDEA.
 * Description:字符流写文件
 * User: lenovo
 * Date: 2022-10-16
 * Time: 20:38
 */
public class demo4 {
    public static void main(String[] args) throws IOException {
        Writer writer = new FileWriter("./bbb.txt");
        writer.write(97);//写一个字符:英文字符
        writer.write("hello world");//写一个字符串
        char[] chars = new char[]{'i','o'};
        writer.write(chars);//写一个字符数组
        writer.close();
    }
}
